<!--
 * @Author: FanChao
 * @Date: 2019-08-12 21:07:03
 * @LastEditors  : FanChao
 * @LastEditTime : 2019-12-30 17:36:23
 * @Description: 
 -->


 <include file="public@header" />
</head>

<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li><a href="{:cmf_plugin_url('UserOther://admin_index/user_other_index')}">用户列表</a></li>
            <li class="active"><a>
                    <if !empty($user['id'])>
                        编辑用户
                        <else />
                        新建用户 
                    </if>
                </a></li>
        </ul>
        <form method="post" class="form-horizontal js-ajax-form margin-top-20" action="{:cmf_plugin_url('UserOther://admin_index/user_other_post')}">
            <!-- <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label"><span
                        class="form-required">*</span>推荐人</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="find" value="{$user.find|default=''}">
                </div>
            </div> -->

            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label"><span
                        class="form-required">*</span>登录名</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="user_login"
                        value="{$user.user_login|default=''}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_login" class="col-sm-2 control-label"><span
                        class="form-required">*</span>手机号</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="mobile"
                        value="{$user.mobile|default=''}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label"><span
                        class="form-required">*</span>{:lang('PASSWORD')}</label>
                <div class="col-md-6 col-sm-10">
                    <input type="password" class="form-control" id="input-user_pass" name="user_pass" value=""
                        placeholder="******">
                </div>
            </div>
            <div class="form-group">
                <label for="input-rank_id" class="col-sm-2 control-label"><span
                        class="form-required">*</span>会员等级</label>
                <div class="col-md-6 col-sm-10">
                	<select class="form-control" name="rank_id" id="input-rank_id">
                        <option value="0">普通会员</option>
                        <foreach name="ranklist" item="vo">
                        <option value="{$key}"
                        <if !empty($user['rank_id'])>
                            <if condition="$user['rank_id'] eq $key">selected</if>
                        </if>
                        >{$vo}</option>
                        </foreach>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label"><span
                        class="form-required">*</span>昵称</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="user_nickname"
                        value="{$user.user_nickname|default=''}">
                </div>
            </div>
           
            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label">积分</label>
                <div class="col-md-6 col-sm-10">
                    <input type="number" class="form-control" id="input-user_login" name="score"
                        value="{$user.score|default=''}">
                </div>
            </div>

            <!--<div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label">金币</label>
                <div class="col-md-6 col-sm-10">
                    <input type="number" class="form-control" id="input-user_login" name="coin"
                        value="{$user.coin|default=''}">
                </div>
            </div>-->
            
            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label">余额</label>
                <div class="col-md-6 col-sm-10">
                    <input type="number" class="form-control" id="input-user_login" name="balance"
                        value="{$user.balance|default=''}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label">邮箱</label>
                <div class="col-md-6 col-sm-10">
                    <input type="text" class="form-control" id="input-user_login" name="user_email"
                        value="{$user.user_email|default=''}">
                </div>
            </div>

            <div class="form-group">
                <label for="input-user_pass" class="col-sm-2 control-label"><span
                        class="form-required">*</span>账号状态</label>
                <div class="col-md-6 col-sm-10">
                    <foreach name="user_status" item="vo">
                        <label class="checkbox-inline">
                            <input value="{$vo.id}" type="radio" name="user_status" 
                            <if !empty($user['user_status'])>
                                <if condition="$user['user_status'] eq $vo['id']">checked</if>
                            </if>
                            >{$vo.name}
                        </label>
                    </foreach>
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                        <input type="hidden" name="id" value="{$user.id|default=''}" />
                    <button type="submit" class="btn btn-primary js-ajax-submit">{:lang('SAVE')}</button>
                    <a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
                </div>
            </div>
        </form>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>